fix(orchestrator): hide Workflows tab from User profile entity pages#3741
Conversation
Fixes: https://redhat.atlassian.net/browse/RHDHBUGS-3245 Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
Changed Packages
|
|
|
Note: After this PR merges and the plugin is published, we also need a follow-up PR on
Without this overlay update, the dynamic plugin deployment in RHDH will still use the old broken condition and the Workflows tab will continue appearing on User profile pages. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3741 +/- ##
=======================================
Coverage 54.59% 54.59%
=======================================
Files 2360 2360
Lines 90121 90120 -1
Branches 25175 25126 -49
=======================================
Hits 49203 49203
+ Misses 40621 40620 -1
Partials 297 297
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
…edhat-developer#3741) Fixes: https://redhat.atlassian.net/browse/RHDHBUGS-3245 Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
…xamples (#2811) * Remove unused YAML files from plugin configuration Removed azure-repositories.yaml and openshift-cluster-manager.yaml from the plugin list. * fix(orchestrator): use hasAnnotation condition in metadata appConfigExamples Replace broken IsOrchestratorCatalogTabAvailable custom condition with the built-in hasAnnotation checker and fix YAML nesting (if should be a sibling of layout under config, not nested under layout). Pairs with #2700 which updates source.json to include the upstream code fix from redhat-developer/rhdh-plugins#3741. Fixes: https://redhat.atlassian.net/browse/RHDHBUGS-3245 Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>



Description
Fixes unintended 'Workflows' tab appearing on User profile entity pages. The
IsOrchestratorCatalogTabAvailablecondition function was implemented as a React component usinguseEntity()hook, which is incompatible with the RHDH dynamic-plugin framework's expected(e: Entity) => booleansignature. This caused the condition to not properly filter out User entities, making the Workflows tab appear on all entity pages including the My Profile page.Root cause
IsOrchestratorCatalogTabAvailableinCatalogTab.tsxwas a React component that used theuseEntity()hook instead of accepting the entity as a parameter. The RHDH dynamic-plugin framework expects customifcondition functions to follow the(e: Entity) => booleansignature and calls them as plain functions with the entity — the hook-based implementation did not work correctly in this context.Additionally, the
app-config.yamlmount point condition referenced this broken custom component instead of using the framework's built-inhasAnnotationchecker. The combination caused the Workflows tab to appear unconditionally on all entity pages, including User profile pages where it should not be shown.Changes
CatalogTab.tsx: ChangedIsOrchestratorCatalogTabAvailablefrom a React hook-based component to a pure predicate function(entity: Entity) => boolean. Compatible with both the legacyEntityLayout.Routeifprop and the RHDH dynamic-pluginif.anyOfcondition system.app-config.yaml: Replaced the customIsOrchestratorCatalogTabAvailablereference with the built-inhasAnnotation: orchestrator.io/workflowschecker for reliable entity filtering in the dynamic plugin system.Fixed
Test Plan
orchestrator.io/workflowsannotationorchestrator.io/workflowsannotationChecklist
Note